Quality Time - Can Aspect-Oriented Programming Lead to More Reliable Software?
نویسندگان
چکیده
A spect-oriented programming is a novel topic in the software engineering and languages communities. AOP appears to have the potential to significantly improve the reliability of programs, particularly by modu-larizing error-handling policies and allowing for easier maintenance and better reuse. In this article we introduce AspectJ, the first aspect-oriented programming language, and demonstrate how you can use it to construct more reliable software. Modularity in Exception Handling Traditional exception-handling code suffers from many problems, the most prominent being that such code tends not to be very modular. The typical reason for this problem is that programmers treat exception handling as an ad hoc process; programmers often sprinkle handlers carelessly throughout the code and write them on a last-minute, as-needed basis, instead of designing them in from the start. Programmers rarely reuse exception-handling code or apply any abstraction to handlers whatsoever. About the only time programmers apply abstraction to exception handlers is when they employ an exception handler to address multiple types of errors. Unfortunately, handling exceptions generically can result in unreliable and ineffective code. For example, programmers often handle otherwise unanticipated exceptions with catch-all handlers. The problem with this solution is that the programmer often has no idea how to recover gracefully from certain situations. Instead, the programmer creates exceptions that log the problem and then exit instead of recovering dynamically. We are not arguing against generic exceptions. For example, it might be nice to handle all remote method calls that fail using RemoteException by retrying the operation three times before aborting. Unfortunately , such functionality would likely require that the programmer touch many different pieces of code. Ideally, it is better to combine generic exceptions with specialized functionality (programmed on a case-by-case basis for each exception). To do so using traditional exception-writing techniques, programmers must manually change every exception, yielding much duplicate code. Another problem is maintenance of exception-handling code. For example, the intended global nature of exception logging might not be intuitive to those who will someday maintain the code. Future main-tainers might add new exception handlers and forget to add appropriate logging functionality. Crosscutting Concerns The key issue that makes exception handling difficult from a management per
منابع مشابه
Impact of aspect-oriented programming on software development efficiency and design quality: an empirical study
The aspect-oriented programming approach is supposed to enhance a system’s features, such as its modularity, readability and simplicity. Due to a better modularization of crosscutting concerns, the developed system implementation would be less complex, and more readable. Thus software development efficiency would increase, so the system would be created faster than its object-oriented equivalen...
متن کاملTowards a Formal Detection of Semantic Conflicts Between Aspects: A Model-Based Approach
Aspect-Oriented Programming is a new promising software engineering paradigm. Aspects are well adapted to capture crosscutting concerns. The new mechanisms introduced by this paradigm allow weaving aspects with different join points in a program. Unfortunately, this flexibility can lead to many unsuspected conflicts between aspects. Moreover, the existing aspect-oriented tools do not detect the...
متن کاملMOP: Reliable Software Development using Abstract Aspects
Monitoring-Oriented Programming (MOP) is a formal framework for software development and analysis. It aims at reducing the gap between formal specification and implementation via runtime monitoring. In MOP, the developer specifies desired properties using definable specification formalisms, along with code to execute when properties are violated or validated, which can be used not only to repor...
متن کاملAspect-oriented Software Quality Model: the Aosq Model
Nowadays, software development has become more complex and dynamic; they are expected more flexible, scalable and reusable. Under the umbrella of aspect, Aspect-Oriented Software Development (AOSD) is relatively a modern programming paradigm to improve modularity in software development. Using Aspect-Oriented Programming (AOP) language to implements crosscutting concerns through the introductio...
متن کاملEvaluation of UML Extensions for Aspect Oriented Design
There are some concepts, such as synchronization, error checking, distribution, security, and others, that are dissimilar from the basic functionality of a system, and they are not correct encapsulated when using traditional programming methodologies. Thus, the code corresponding to these concepts result disseminated through the complete system, and therefore the overall software quality decrea...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- IEEE Software
دوره 17 شماره
صفحات -
تاریخ انتشار 2000